package com.xnchat.pro.mapper;

import com.xnchat.pro.dto.OneYige;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface OneYIgeRepository extends JpaRepository<OneYige, Integer> {
    @Query(nativeQuery = true,value="select count(*) from `one_yige`")
    int countAll();

    int countAllByType(int type);

    Page<OneYige> findByType(int type,Pageable pageable);
}
